import 'package:dmz/base/pageWidget/base_stateful_widget.dart';
import 'package:dmz/business/home/controller/share_moto_controller.dart';
import 'package:dmz/business/home/model/moto_model.dart';
import 'package:dmz/business/home/widgets/share_main_widgets.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';

class ShartMotoPage extends BaseStatefulWidget<ShareMotoController> {
  const ShartMotoPage({super.key});

  @override
  bool showTitleBar() => true;

  @override
  String titleString() => '用车分享'.tr;

  @override
  Widget buildContent(BuildContext context) {
    if (Get.arguments != null && Get.arguments is MotoModel) {
      controller.model = Get.arguments as MotoModel;
    }

    return ShareMotoWidgets.backGroundWidget(ListView(children: [
      ShareMotoWidgets.deviceInfor(controller.model),
      ShareMotoWidgets.midelWiedget(controller.shareAction),
      ShareMotoWidgets.bottomWidget()
    ]));
  }
}
